module.exports=function(){document.querySelectorAll(".popup__wrap").forEach(function(a){a.addEventListener("click",function(a){null===a.target.closest(".popup__container")&&(this.style.display="none",this.querySelector(".popup__container").style.display="none")})}),document.addEventListener("mouseup",function(a){a.srcElement.classList.value.includes("user-select-none")||(this.querySelectorAll(".context__file").forEach(a=>a.style.cssText="display:none"),this.querySelectorAll(".file__table-ctx").forEach(a=>a.classList.remove("context__active")));const b=document.querySelectorAll(".tb__popup");b.forEach(b=>{b.contains(a.target)||(b.style.display="none")}),document.querySelectorAll(".tb__span").forEach(a=>a.classList.remove("tb__bth-active"))});const b=(a,b)=>{document.querySelector("."+a).addEventListener("click",function(){document.querySelectorAll(".tb__popup").forEach(a=>{a.classList.value.includes(b)||(a.style.display="none")}),document.querySelectorAll(".tb__span").forEach(b=>{b.classList.value.includes(a)||b.classList.remove("tb__bth-active")}),this.classList.toggle("tb__bth-active"),document.querySelector("."+b).style.display="none"===document.querySelector("."+b).style.display?"block":"none"})};b("kit__button-span","kit__popup"),b("new__button-span","new__popup"),b("search__button-span","search__popup"),b("remember__button-span","remember__popup"),b("regexp__button-span","regexp__popup")};
